Linux使用iPhone USB共享网络 |
您所在的位置:网站首页 › 蓝牙 iPhone 共享网络 › Linux使用iPhone USB共享网络 |
关键字: ipheth 、ipheth-pair 、usbmuxd 、libimobiledevice Apple iPhone USB Ethernet Ubuntu系统默认可以识别,CentOS系统需要安装库文件 网卡识别Ubuntu系统(20.04)版本,在连接IPhone后,可以识别到iPhone手机的网卡设备。CentOS默认无法识别。 部分资料说明参考安装ipheth-driver和ipheth-pair,其实CentOS默认已包含ipheth,不需要另外安装 默认ipheth路径:/lib/modules/xxxxxxx/kernel/drivers/net/usb CentOS系统无法识别IPhone原因在于需要安装usbmuxd,安装usbmuxd需要依赖libimobiledevice、libplist、libusbmuxd 安装方法1:rpm离线安装 https://download.opensuse.org/repositories/home:/qmfrederik/CentOS_8/x86_64/ 如遇如下错误,需先下载安装compat-openssl11-1.1.1k-4.el9.x86_64.rpm 安装方法2:yum在线安装 默认yum source找不到这几个安装包,需要修改source。 下载yum source文件: cd /etc/yum.repos.d/ wget https://download.opensuse.org/repositories/home:qmfrederik/CentOS_8/home:qmfrederik.repo yum install libplist libusbmuxd libimobiledevice usbmuxd安装完成后连接IPhone可以看到有网卡设备 信任匹配在完成上面步骤,识别网卡后,配置网络信息发现,并无法正常共享网络实现上网功能 原因为IPhone设备需要信任匹配,如下图: 完成信任匹配后,配置好网卡为自动获取IP,即可实现正常上网功能。 网卡配置补充Centos网卡配置方法 方法1:nmtui命令,进入图形界面,输入网卡名称(ipconfig查看后记录一下) 方法2:nmcli命令 nmcli connection add con-name eth0 ipv4.method auto ifname eth0 type ethernet其中,eth0为iPhone识别的网卡名称示例,根据识别情况修改 方法3:nmconnection文件 以上两种方式,最终都会实现创建nmconnection文件,内容如下: /etc/NetworkManager/system-connections/eth0.nmconnnection [connection] id=eth0 uuid=8ffexxxx-af50-xxxx-8a6f-71xxxxaexxx6 type=ethernet interface-name=eth0 [ethernet] [ipv4] method=auto [ipv6] addr-gen-mode=stable-privacy method=auto [proxy] Android设备Android设备网卡识别基本不需要额外安装驱动,开启热点选择USB共享连接,即可识别出网卡。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |